<?php
namespace app\admin\model\goods;
use think\facade\Db;
use app\admin\common;

class Type{
	
	public function insertType($_data){
		return Db::name("shop_type")->insert($_data,true);
	}
	
	public function upType($_up,$_where){
		return Db::name("shop_type")->where($_where)->update($_up);
	}
	
	public function findData($_where,$_field){
		return Db::name("shop_type")->where($_where)->field($_field)->find();
	}
	
	public function selectData($_where,$_field,$_limit,$_order){
		$_data=Db::name("shop_type")->where($_where)->field($_field)->limit(current($_limit),end($_limit))->order($_order)->select();
		return empty($_data)?:$_data->toArray();
	}
}
?>